﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;

namespace GNSWebSite.Settings
{
    public static class GoogleMapSettings
    {
        public static XDocument _doc = XDocument.Load(HttpContext.Current.Server.MapPath("~/Settings/GnsSettings.xml"));
        /// <summary>
        /// number of alphanumeric characters return
        /// </summary>
        public static string MapApiKey
        {
            get
            {
                return _doc.Descendants("gnssettings").Elements("google").FirstOrDefault().Element(
                            "mapapikey").Attribute("value").Value;
            }
        }
    }
}
